import request from '@/utils/myrequest'

export function getList(kvs) {
  return request({
    url: 'config/equipmentbase/getlist',
    method: 'get',
    kvs
  })
}

export function add(kvs) {
  return request({
    url: '/config/equipmentbase/add',
    method: 'post',
    kvs
  })
}

export function get(kvs) {
  return request({
    url: 'config/equipmentbase/get',
    method: 'get',
    kvs
  })
}

export function del(kvs) {
  return request({
    url: '/config/equipmentbase/delete',
    method: 'post',
    kvs
  })
}

export function edit(kvs) {
  return request({
    url: '/config/equipmentbase/update',
    method: 'post',
    kvs
  })
}

export function eqpnamelist(kvs) {
  return request({
    url: '/config/equipmentbase/geteqpnamelist',
    method: 'get',
    kvs
  })
}

export function getEqpNameList(kvs) {
  return request({
    url: '/config/equipmentbase/GetEqpNameList',
    method: 'get',
    kvs
  })
}

export function eqpidnamelist(kvs) {
  return request({
    url: '/config/equipmentbase/GetEqpIdNameList',
    method: 'get',
    kvs
  })
}

export function eqptypelist(kvs) {
  return request({
    url: 'config/equipmenttypes/getlist',
    method: 'get',
    kvs
  })
}

export function eqpmodellist(kvs) {
  return request({
    url: '/config/eqpmodel/GetEqpModelAndType',
    method: 'get',
    kvs
  })
}

export function getEqpModelList(kvs) {
  return request({
    url: '/config/eqpmodel/geteqpmodellist',
    method: 'get',
    kvs
  })
}

export function eqpbrandlist(kvs) {
  return request({
    url: 'config/eqpmodel/geteqpBrandList',
    method: 'get',
    kvs
  })
}

export function facilitylist(kvs) {
  return request({
    url: 'config/eqpmodel/getfacilitylist',
    method: 'get',
    kvs
  })
}

export function geteqpmodel(kvs) {
  return request({
    url: 'config/eqpmodel/geteqpmodel',
    method: 'get',
    kvs
  })
}
// 获取Tester ID列表
export function getTestList(kvs) {
  return request({
    url: '/config/EquipmentBase/GetEqpNameListByType',
    method: 'get',
    kvs
  })
}
// 获取Tester ID列表
export function getEqpNameListBy(kvs) {
  return request({
    url: '/config/EquipmentBase/GetEqpNameListByType',
    method: 'get',
    kvs
  })
}
// 获取Handler ID列表
function getHandleList(kvs) {
  return request({
    url: '/config/EquipmentBase/GetHandleList',
    method: 'get',
    kvs
  })
}
// 获取 Head ID列表
function getHeadidList(kvs) {
  return request({
    url: '/config/eqphead/getheadidlist',
    method: 'get',
    kvs
  })
}

// 获取 测试机_测试头 列表
function getEqpHeadList(kvs) {
  return request({
    url: '/config/eqphead/GetEqpHeadList',
    method: 'get',
    kvs
  })
}

export function getEqpUserGroups(kvs) {
  return request({
    url: '/config/EquipmentBase/GetEqpUserGroups',
    method: 'get',
    kvs
  })
}

export function getAllEqpUserGroup(kvs) {
  return request({
    url: '/config/UserGroup/GetAllUserGroups',
    method: 'get',
    kvs
  })
}

export function getEqpTypes(kvs) {
  return request({
    url: '/config/EquipmentBase/GetEqpTypes',
    method: 'get',
    kvs
  })
}
export function download(kvs) {
  return request({
    url: 'config/download/GetTemplate',
    method: 'get',
    kvs
  })
}

export function getEqpTypesList(kvs) {
  return request({
    url: '/config/EquipmentTypes/getlist',
    method: 'get',
    kvs
  })
}

export function getTabList(kvs) {
  return request({
    url: '/config/project/getproject',
    method: 'get',
    kvs
  })
}
// 删除
export function doDeleteTabs(kvs) {
  return request({
    url: '/tms/EquipmentBase/delete',
    method: 'POST',
    kvs
  })
}

// 获取设备编号
export function getEqpIdListByType(kvs) {
  return request({
    url: '/config/EquipmentBase/GetEqpIdListByType',
    method: 'get',
    kvs
  })
}

export function getSiteIdList(kvs) {
  return request({
    url: '/config/EquipmentBase/GetSiteIdList',
    method: 'get',
    kvs
  })
}

export default { getList, get, add, edit, del, eqpnamelist, eqptypelist, eqpmodellist, eqpidnamelist, getEqpModelList,
  eqpbrandlist, facilitylist, geteqpmodel,
  getTestList, getHandleList, getHeadidList,
  getEqpHeadList, getEqpUserGroups, download,
  getEqpNameListBy, getTabList, doDeleteTabs }
